
import http from "./request.ts"
import qs from 'qs'
// home/recommendProduct/list 分页查询推荐
export const homeRecommendProductList = (params: MyHomeBrandListParams): RES<MyHomeBrandListModel> => http.get("/home/recommendProduct/list", { params })
// home/recommendProduct/create 添加首页推荐

export const homeRecommendProductCreate = (params: MyHomeNewParams[]): RES<HomeBrandUpdateRecommendStatusModel> => http.post("/home/recommendProduct/create", params)
// home/recommendProduct/delete 批量删除推荐
export const homeRecommendProductDelete = (params: { ids: string | number }

): RES<MyHomeBrandListModel> => http.post(`/home/recommendProduct/delete`, qs.stringify(params))
// home/recommendProduct/update/recommendStatus 批量修改推荐状态
export const homeRecommendProductUpdateRecommendStatus = (params: {
    recommendStatus: number;
    ids: any
}): RES<HomeBrandUpdateRecommendStatusParams> => {
    return http.post(`/home/recommendProduct/update/recommendStatus`, qs.stringify(params))
}
//home/recommendProduct/update/sort/{id} 修改推荐排序
export const homeRecommendProductSortByID = (params: { id: string | number, sort: string }

): RES<MyHomeBrandListModel> => http.post(`/home/recommendProduct/update/sort/${params.id}?sort=${params.sort}&id=${params.id}`)

